/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package digitaldreamers.libraries.games.clients.gameclient.gameui.abstracts;

import java.util.ArrayList;


/**
 *
 * @author DaoLe
 */
public interface IInput {
    
    public static class KeyEvent {
        
        public static final int KEY_DOWN = 0;
        public static final int KEY_REPEATED = 1;
        public static final int KEY_UP = 2;
        
        private int m_iType;
        private int m_iKeyCode;
        private String m_iKeyName;
        
        public int getType() {
            return m_iType;
        }
        
        public int getKeyCode() {
            return m_iKeyCode;
        }
        
        public String getKeyChar() {
            return m_iKeyName;
        }
        
        public KeyEvent(int type, int keyCode, String keyName) {
            m_iType = type;
            m_iKeyCode = keyCode;
            m_iKeyName = keyName;
        }
    }

    public static class TouchEvent {
        
        public static final int TOUCH_DOWN = 0;
        public static final int TOUCH_UP = 1;
        public static final int TOUCH_DRAGGED = 2;

        private int m_iType;
        private int m_iX;
        private int m_iY;
        
        public int getType() {
            return m_iType;
        }
        
        public int getX() {
            return m_iX;
        }
        
        public int getY() {
            return m_iY;
        }
        
        public TouchEvent(int type, int x, int y) {
            m_iType = type;
            m_iX = x;
            m_iY = y;
        }
    }

    public boolean isKeyPressed(int keyCode);

    public boolean isTouchDown(int pointer);
    
    public int getTouchX(int pointer);
    
    public int getTouchY(int pointer);

    public ArrayList getKeyEvents(); //key event type

    public ArrayList getTouchEvents(); //touch event type
}
